<template>
	<div>
		<div class="Abox">
			<Info
				ref="Info"
				v-model="infoData"
				v-bind="querys"
				state="readonly"></Info>
			<Contract
				ref="Contract"
				v-model="infoData"
				v-bind="querys"
				:showHistory="false"
				state="readonly"></Contract>
			<Footer
				ref="Footer"
				v-model="infoData"
				v-bind="querys"
				state="readonly"></Footer>
			<!-- <el-button -->
			<!-- class="orderChangeHistory" -->
			<!-- type="primary" -->
			<!-- @click="toOrderChangeHistory"> -->
			<!-- 查看变更历史记录 -->
			<!-- </el-button> -->
		</div>
	</div>
</template>

<script>
	import * as apis from '@/api/order/mainOrder/contractChange/api.js';
	import Info from '../chunk/info/index.vue';
	import Contract from '../chunk/contract/index.vue';
	import Footer from '../chunk/footer/index.vue';
	export default {
		name: 'contractChange',
		props: {
			value: {
				required: false,
			},
			state: {
				required: false,
			},
		},
		components: { Info, Contract, Footer },
		data() {
			return {
				querys: {},
			};
		},

		computed: {
			infoData: {
				get() {
					return this.useVModel.call(this);
				},
				set(val) {
					this.$emit('input', val);
				},
			},
		},
		created() {
			this._onload();
		},
		mounted() {},
		methods: {
			flow_submit() {
				// this.submit();
			},
			submit() {
				let params = this._.cloneDeep(this.infoData);
				if (this.Empty(params.auditContent)) {
					params.auditContent = null;
				}
				apis.Submit(params);
			},
			toOrderChangeHistory() {
				this._toPage({
					name: 'OrderChangeHistory',
					query: {
						orderId: this.querys.orderId,
					},
				});
			},
		},
	};
</script>

<style lang="scss" scoped>
	.orderChangeHistory {
		position: fixed;
		bottom: calc(100vh - 150px);
		right: 40px;
		cursor: pointer;
		transition: all 0.3s;
	}
	.handle {
		height: 60px;
		display: flex;
		justify-content: flex-end;
		align-items: center;
		background-color: #fff;
		margin: 20px;
		padding: 0 20px;
		border-radius: 8px;
		box-sizing: border-box;
	}
</style>
